<div id="page_<%= page.id %>" class="page">
	<h2><%= link_to page.title, :action => :view, :id => page %></h2>
	
	<%= page.formatted_text %>
	
	<div id="page_controls_<%= page.id %>" class="page_controls">
		Posted <%= time_ago_in_words page.created_on %> ago
		<% if session[:user] -%>
		<%= link_to_remote "edit",
			{
				:loading => "$('show_edit_indicator_#{page.id}').show()",
				:complete => "$('show_edit_indicator_#{page.id}').hide()",
				:url => { :action => :remote_show_edit, :id => page }
			},
			{
				:href => url_for(:action => :edit, :id => page)
			}
		%>
		<%= image_tag 'spinner.gif', :size => '16x16', :alt => "Please wait...", :style => 'display: none', :id => "show_edit_indicator_#{page.id}", :class => 'middle' %>
		<% end -%>
	</div>
</div>
